home *** CD-ROM | disk | FTP | other *** search
- -- card: 9129 from stack: in.3r
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 2202
- -- name: PowerToggle
- ----- HyperTalk script -----
- on enterkey
- if the shiftkey is down then
- if the tool is "browse tool" then choose button tool
- else if the tool is "button tool" then choose field tool
- else choose browse tool
- else
- if the optionkey is down then
- if the tool is "button tool" then domenu new button
- else if the tool is "field tool" then domenu new field
- else pass enterkey
- end if
- end if
- end enterkey
-
-
-
-
- -- part contents for background part 10
- ----- text -----
- 8
-
- -- part contents for background part 3
- ----- text -----
- PowerToggle
-
- -- part contents for background part 2
- ----- text -----
- --NOTE: Handlers are included in the Function section for convenience.
-
- --This script is a variation of a script presented in the January 1988 issue of MacWorld.
- --It allows you regular use of the enterkey, but turns it into a tool toggle when the
- --shiftkey is held down. Additionally it it turns into an object creator when the option key
- --is held down.
- --
- --When the enterkey is pressed with the shiftkey held down, the tool palette will toggle
- --from the browse tool to the button tool to the field tool and back to the browse tool.
- --
- --When the enterkey is pressed with the optionkey held down, you will create a new field,
- --or a new button, depending upon which tool is hilighted.
- --
- --Best place to put this is in your home stack script. It is installed in this card. Try it!
- --This variation is from Steve Drazga, AnaltyX.
- --
- on enterkey
- if the shifkey is down then
- if the tool is "browse tool" then choose button tool
- else if the tool is "button tool" then choose field tool
- else choose browse tool
- else
- if the optionkey is down then
- if the tool is "button tool" then domenu new button
- else if the tool is "field tool" then domenu new field
- else pass enterkey
- end if
- end if
- end enterkey
-
-
- -- part contents for background part 19
- ----- text -----
- Functions